package com.qike.duola.response;







import com.qike.duola.enums.RetCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

@ApiModel("返回数据")
public class BaseResult<T> implements Serializable {

    @ApiModelProperty("编码")
    public int code;
    @ApiModelProperty("文本")
    private String message;
    @ApiModelProperty("数据")
    private T data;
    @ApiModelProperty("状态")
    private boolean status;

    public BaseResult<T> setCode(RetCode retCode) {
        this.code = retCode.code;
        return this;
    }

    public int getCode() {
        return code;
    }

    public BaseResult<T> setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return message;
    }

    public BaseResult<T> setMsg(String msg) {
        this.message = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public BaseResult<T> setData(T data) {
        this.data = data;
        return this;
    }

    public boolean isStatus() {
        return status;
    }

    public BaseResult<T> setStatus(boolean status) {
        this.status = status;
        return this;
    }
}